package com.java.order.controller;


import com.java.order.bean.CQZGResult;
import com.java.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author TriggerWu
 * @since 2018-09-13
 */
@Controller
@RequestMapping("/rest/order")
public class OrderController {
    @Autowired
    private OrderService orderService;
    /*
     *  创建订单
     * 
     * @author Tigger Wu
     * @date 2018/9/20 10:00
     * @param [json]
     * @return CQZGResult
     */
    @ResponseBody
    @RequestMapping(value = "/create" , method = RequestMethod.POST)
    public CQZGResult createOrder(@RequestBody String json) {
        return orderService.createOrder(json);
    }
}

